package com.mkl.ttxt.pd.dao;

import com.mkl.ttxt.pd.bo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IPdDao {

    List<MemberOrCard> getAllMember(@Param("userId")Integer userId);

    List<MemberOrCard> getAllCard();

    void cleanBox(@Param("userId")Integer userId);

    void batchInsert(@Param("boxList")List<Box> boxList, @Param("userId")Integer userId);

    List<Box> getMemberBox(@Param("memberId")Integer memberId);

    void updateBox(@Param("box") Box box, @Param("userId")Integer userId);

    void addLineup(@Param("lineup") Lineup lineup, @Param("userId")Integer userId);

    List<Lineup> getAllLineup(@Param("userId")Integer userId);

    String getCardName(@Param("cardId")Integer cardId);

    void cleanMemberLineup(@Param("userId")Integer userId);

    void recordMemberLineup(@Param("memberLineup") MemberLineup memberLineup, @Param("userId")Integer userId);

    void recordLineupCompose(@Param("lineupCompose")LineupCompose lineupCompose, @Param("userId")Integer userId);

    List<Integer> getMemberIdsByLineup(@Param("lineupId")Integer lineupId, @Param("userId")Integer userId);

    void cleanPossibleCompose(@Param("userId")Integer userId);

    Lineup getLineupById(@Param("lineupId")Integer lineupId);

    List<String> getMembersByIds(@Param("memberList")List<String> memberList);

    List<LineupCompose> getAllSetMeal(@Param("userId")Integer userId);

    Integer getUserIdByName(@Param("userName")String userName, @Param("userId")Integer userId);

    List<LineupCompose> getUserSetMeal(@Param("memberId")Integer memberId, @Param("userId")Integer userId);

    LineupCompose getLineupComposeById(@Param("lineupComposeId")Integer lineupComposeId, @Param("userId")Integer userId);

    void updateLineComposeUser(@Param("lineupCompose")LineupCompose lineupCompose, @Param("userId")Integer userId);

    void recordLineupComposeScore(@Param("id")Integer id, @Param("score")Integer score, @Param("userId")Integer userId);

    void cleanLineup(@Param("userId")Integer userId);

    List<Integer> getLineupIdListByBossNo(@Param("userId")Integer userId, @Param("bossNo")Integer bossNo);

    List<Integer> getLineupIdListByBossNoList(@Param("userId")Integer userId, @Param("doneBossNoList")List<Integer> doneBossNoList);

    LineupCompose getBestCompose(@Param("userId")Integer userId, @Param("lineupIdList")List<Integer> lineupIdList,
                                 @Param("availableLineUpIdList")List<Integer> availableLineUpIdList);

    List<Integer> getAllMemberId(@Param("userId")Integer userId);

    LineupCompose getSecondCompose(@Param("userId")Integer userId, @Param("lineupIdList")List<Integer> lineupIdList,
                                   @Param("availableLineUpIdList")List<Integer> availableLineUpIdList,
                                   @Param("notAvailableLineUpIdList")List<Integer> notAvailableLineUpIdList);

    List<Integer> orderLineupMember(@Param("memberIdList") List<String> memberIdList, @Param("userId")Integer userId);

    Integer getabandonmentComposeCount(@Param("userId")Integer userId);
}
